import { Key } from "antd/es/table/interface";
import Request from "../request";
import { EditData, tablePrams } from "../type/table";
import { createOrUpdateData } from "../type/active";

export const getTableData = (data: tablePrams) => {
  return Request({
    url: "/table",
    method: "post",
    data,
  });
};

export const delTableData = (data: Key[]) => {
  return Request({
    url: "/delete",
    method: "post",
    data,
  });
};
interface getEditData{
  editId:number;
}
export const getActiveEditData = (data:getEditData) => {
  return Request({
    url: "/editActiveData",
    method: "post",
    data: data,
  });
};
export const createData = (data: createOrUpdateData) => {
  return Request({
    url: "/createActiveTable",
    method: "post",
    data,
  });
};
